package com.honglv.controller.admin;

import com.honglv.pojo.dto.UploadAttractionsDTO;
import com.honglv.pojo.result.Result;
import com.honglv.service.AttractionsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController("adminAttractionsController")
@Slf4j
@RequestMapping("/admin")
@Api("景点相关接口")
public class AttractionsController {


        @Autowired
        private AttractionsService attractionsService;

        /**
         * 管理员上传景点
         * @param
         * @return
         */
        @PostMapping("/uploadAttractions")
        @ApiOperation("上传景点")
        public Result uploadAttractions(@RequestBody UploadAttractionsDTO uploadAttractionsDTO){
            attractionsService.upload(uploadAttractionsDTO);
            return Result.success();
        }


    }


